<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style type="text/css">
    h3{
      color: #b2b2b2;
    }
    h1{
      margin: 0px;
      text-align: center;
      color: #b2b2b2;
    }

  </style>
  <link href="../layui/css/layui.css" rel="stylesheet" />
</head>
<body>
<h3>疾病问诊</h3>
<h1>病人信息</h1>
<hr class="layui-border-green">
<form class="layui-form">
  <div class="layui-form-item">
    <label class="layui-form-label">病人姓名*</label>
    <div class="layui-input-block">
      <input  id="name" type="text" name="name"   autocomplete="off" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">身份证号*</label>
    <div class="layui-input-block">
      <input  id="idCard" type="text" name="idCard"   autocomplete="off" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">病人性别*</label>
    <div class="layui-input-block">
      <input type="radio" name="sex" value="2" title="男" checked>
      <input type="radio" name="sex" value="1" title="女">
    </div>
  </div>

  <!--<div class="layui-form-item">
    <label class="layui-form-label">性别*</label>
    <div class="layui-input-block">
      <select id="sex" name="sex">
        <option value=""></option>
        <option value="1">男</option>
        <option value="2">女</option>
      </select>
    </div>
  </div>-->

  <div class="layui-form-item">
    <label class="layui-form-label">出生日期*</label>
    <div class="layui-input-block">
      <input id="birthday"  id="birthday" type="text" name="birthday"   autocomplete="off" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">家庭住址*</label>
    <div class="layui-input-block">
      <input id="address" type="text" name="address"   autocomplete="off" class="layui-input">
    </div>
  </div>

  <hr class="layui-border-green">
  <h1>病人信息</h1>

  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">病人主诉*</label>
    <div class="layui-input-block">
      <textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
    </div>
  </div>

  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">诊断结果*</label>
    <div class="layui-input-block">
      <textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">添加医嘱</button>
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo2">问诊结束</button>
      <button  class="layui-btn layui-btn-radius layui- btn-normal" lay-submit lay-filter="formDemo3">返回</button>
    </div>
  </div>
</form>

<script src="../js/jquery.min.js"></script>
<script src="../layui/layui.js"></script>
<script>
  //Demo
  layui.use(['laydate','form'], function(){
    var form = layui.form;
    var $ =layui.jquery;
    var laydate =layui.laydate;

    laydate.render({
      elem:'#birthday'
    })
    //提交
    form.on('submit(formDemo)', function(data){
     // console.log(data.field);
     /* $.post({"http://localhost:8090/pat/selectPat",data.field,function(){

        }})*/
      layer.msg("添加成功")
      //layer.msg(JSON.stringify(data.field));
      return false;
    });
    form.on('submit(formDemo2)', function(data){
      // console.log(data.field);
      /* $.post({"http://localhost:8090/pat/selectPat",data.field,function(){

         }})*/
      layer.msg("问诊结束")
      //layer.msg(JSON.stringify(data.field));
      return false;
    });
    form.on('submit(formDemo3)', function(data){
      layer.msg("返回不了，请右上角关闭")
      return false;
    });
  });
</script>
</body>
</html>